Learn R Programming

PerFit (version 1.2)

plot PerFit: Plot method for objects of class "PerFit"

Description

Plot method for objects of class "PerFit".

Usage

## S3 method for class 'PerFit':
plot(x, type = "Density", both.scale = TRUE, cutoff = TRUE, method = "Quantile", 
 Qlvl = 0.05, Blvl = 0.05, Breps = 1000, UDlvl = NA,
 Xlabel=NA,Xcex=1.5,title=NA,Tcex=1.5,...)

Arguments

x
Object of class "PerFit".
type
Type of plot: "Histogram", "Density" (default), "Both".
both.scale
Logical: Should the y-axis be adjusted so that both the histogram and the density graphics are completely visible? Default is TRUE.
cutoff
Logical: Should the estimated statistic cutoff be added to the plot? Default is TRUE.
method
Method required to compute the cutoff score: "Quantile", "Bootstrap", "UserDefined". Default is "Quantile".
Qlvl
Quantile level (value between 0 and 1), only used when method="Quantile". Default is 0.05.
Blvl
Bootstrap level (value between 0 and 1), only used when method="Bootstrap". Default is 0.05.
Breps
Number of bootstrap resamples, only used when method="Bootstrap". Default is 1000.
UDlvl
User-defined level, only used when method="UserDefined".
Xlabel
Define label of x-axis, otherwise a default label is shown.
Xcex
Font size of the label of x-axis.
title
Define the title of the plot, otherwise a default title is shown.
Tcex
Font size of the title of the plot.
...
Extra graphical parameters to be passed to plot.

Details

This function plots the empirical distribution of the scores of the person-fit statistic specified by the "PerFit" class object x. A histogram, density, or a combination of both displays is possible. The cutoff score is internally computed, for which the user may define method, Qlvl, Blvl, Breps, and UDlvl accordingly (see cutoff). The value of the cutoff is superimposed to the plot when cutoff=TRUE. In this case, the adequate "flagging region" is colored, thus indicating the range of values for which the person-fit statistic flags respondents as potentially displaying aberrant behavior. The option both.scale was introduced to help to better tune the scale of the y-axis.

See Also

cutoff, flagged.resp, PRFplot

Examples

Run this code
# Load the inadequacy scale data (dichotomous item scores):
data(InadequacyData);

# Compute the ZU3 scores:
ZU3.PF <- ZU3(InadequacyData);

# Plot the sample distribution of the ZU3 scores with the quantile 1% cutoff value superimposed:
plot(ZU3.PF,type="Both",Qlvl=.01);

# Plot the sample distribution of the ZU3 scores with a bootstrapped 5% cutoff value superimposed:
plot(ZU3.PF,type="Both",method="Bootstrap");

Run the code above in your browser using DataLab